
/*
 * Hlpay-Plus aggregate payment system. Copyright
 * (c) 2022-2023 Hlpay Team Copyright has the right of final interpretation.
 */
package com.hlkj.pay.service.admin;

import com.hlkj.framework.common.pojo.PageResult;
import com.hlkj.pay.dto.admin.PermissionQueryDto;
import com.hlkj.pay.infrastructure.model.admin.PermissionDO;

import java.util.List;

/**
 * @author HlpayTeam
 * @date 2024/09/03 14:17
 */
public interface IPermissionService {
    

    /**
     * 从数据库获取权限
     * @param roleCodes
     * @return
     */

    List<PermissionDO> queryRolePermission(List<String> roleCodes);

    /**
     * 查询所有权限
     * @return
     */
    List<PermissionDO> queryAllPermission(Integer sysType);
    /**
     * queryParentPermission
     * @param parentCode
     * @return
     */
    PermissionDO queryParentPermission(String parentCode);
    /**
     * queryParentPermission
     * @param parentCode
     * @return
     */
    PermissionDO queryMaxPermission(String parentCode,Integer type);
    /**
     * queryParentPermission
     * @param permissionCode
     * @return
     */
    PermissionDO queryPermissionByCode(String permissionCode);
    /**
     * queryParentPermission
     * type
     * @param permissionName
     * @return
     */
    PermissionDO queryParentPermissionByName(String permissionName,Integer type,Integer sysType);
    /**
     * queryPermissionList
     * @param permissionQueryDto
     * @return
     */
    List<PermissionDO> queryPermissionList(PermissionQueryDto permissionQueryDto);
    /**
     * queryPermissionList
     * @param permissionQueryDto
     * @return
     */
    PageResult<PermissionDO> queryPermissionPage(PermissionQueryDto permissionQueryDto);
    /**
     * add
     * @param permissionDO
     */
    void add(PermissionDO permissionDO);
    /**
     * update
     */
    void update(PermissionDO updatePermissionDO);
    /**
     *
     * @param id
     * @return
     */
    PermissionDO queryParentPermissionById(Long id);
    /**
     *
     * @param id
     */
    void delete(Long id,Integer sysType);
}
